/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.game.math.view.domain;

import javax.swing.JToggleButton;
import org.game.math.config.Configure;

/**
 *
 * @author nmduc
 */
public class SignToggledModel extends JToggleButton.ToggleButtonModel {

    public SignToggledModel() {
        this.setSelected(Boolean.parseBoolean(Configure.getInstance().getTempProperties().getProperty(Configure.SIGN)));
    }

    @Override
    public void setSelected(boolean b) {
        super.setSelected(b);
        Configure.getInstance().getTempProperties().setProperty(Configure.SIGN, Boolean.toString(isSelected()));
    }
}
